<script>

import * as echarts from 'echarts'

export default {
    mounted() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'));

        // 绘制图表
        myChart.setOption({
            title: {
                text: '消息发布数量统计'
            },
            tooltip: {},
            xAxis: {
                data: ['通知', '公告', '活动', '作业', '家园任务', '缴费通知']
            },
            yAxis: {},
            series: [
                {
                    name: '销量',
                    type: 'bar',
                    data: [5, 20, 36, 10, 10, 20]
                }
            ]
        });
    },
}


</script>


<template>
    <div>
        <main id="main"></main>
    </div>
</template>



<style lang="scss" scoped>

#main{
    width: 100%;
    height: 600px;
}

</style>